extends Node2D


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	pass


func _on_gravity_area_entered(area: Area2D) -> void:
	if not area.is_in_group("player"):return
	pass


func _on_end_port_area_entered(area: Area2D) -> void:
	if not area.is_in_group("player"):return
	Global.player_movment_mode.emit("static")
	var twn:=create_tween()
	twn.tween_property(%Player,"global_position",$BlackHole/EndPort.global_position,3.0)
	await twn.finished
	%EyeTrans.eye(false)
	await %EyeTrans.eye_finish
	Black.visible=true
	Global.passed_game=true
	if Global.enter:get_tree().change_scene_to_packed(Global.enter)
